Skip to content

chore: raise initial bundle budget warning to 600kB - #14

Merged
Garfield-fr merged 1 commit into
rero:mainfrom
Garfield-fr:chore/bundle-budget
Nov 24, 2026
Merged

Garfield-fr merged 1 commit into
rero:mainfrom
Garfield-fr:chore/bundle-budget

Conversation

@Garfield-fr

Copy link
Copy Markdown
Collaborator

Summary

pnpm build warned that the initial bundle (526 kB raw, 119 kB transferred) exceeded the 512 kB budget. This PR raises the warning threshold to 600 kB. The 1 MB error threshold is unchanged.

Why not trim the bundle instead

Breakdown of main.js from ng build --stats-json:

Package Size
@angular/core 206 kB
@openng/optimus-ui-themes 133 kB
@angular/router 96 kB
@angular/common 39 kB
@openng/optimus-ui 33 kB
rxjs 25 kB
Application code 9 kB
  • Angular itself accounts for about 340 kB.
  • The Aura preset ships design tokens for all 91 Optimus components, used or not. It is a single object passed to provideOptimus, so it cannot be tree-shaken. A hand-built preset with only the components we use would be fragile: any component we forget to add would render unstyled.
  • Application code is small, and features are already lazy-loaded.

Checks

  • pnpm build: passes with no budget warning

🤖 Generated with Claude Code

The initial bundle is 526kB (119kB transferred) and exceeded the 512kB
warning threshold. Most of it cannot be trimmed: Angular core, router
and common take about 340kB, and the Aura preset ships tokens for all
91 Optimus components (133kB) as a single object that is not
tree-shakeable. Application code is only 9kB and features are already
lazy-loaded.

The 1MB error threshold is unchanged.

Co-Authored-by: Bertrand Zuchuat <bertrand.zuchuat@rero.ch>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 54 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 1a237a18-aa95-417e-8cbe-24908d9eb5f0
Commits

Reviewing files that changed from the base of the PR and between 2ce1d4f and 76caa90.

Files selected for processing: 1

  • angular.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Garfield-fr
Garfield-fr merged commit 1eabdcb into rero:main Nov 24, 2026
3 checks passed
@Garfield-fr
Garfield-fr deleted the chore/bundle-budget branch November 24, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant